const Mainloop = imports.mainloop;
const Signals = imports.signals;
-let IBusCandidatePopup;
-try {
- var IBus = imports.gi.IBus;
- _checkIBusVersion(1, 5, 2);
- IBusCandidatePopup = imports.ui.ibusCandidatePopup;
-} catch (e) {
- var IBus = null;
- log(e);
-}
+const IBus = imports.gi.IBus;
+const IBusCandidatePopup = imports.ui.ibusCandidatePopup;
+
+// Ensure runtime version matches
+_checkIBusVersion(1, 5, 2);
let _ibusManager = null;
_PRELOAD_ENGINES_DELAY_TIME: 30, // sec
_init: function() {
- if (!IBus)
- return;
-
IBus.init();
this._candidatePopup = new IBusCandidatePopup.CandidatePopup();
},
getEngineDesc: function(id) {
- if (!IBus || !this._ready || !this._engines.hasOwnProperty(id))
+ if (!this._ready || !this._engines.hasOwnProperty(id))
return null;
return this._engines[id];
// Send id even if id == this._currentEngineName
// because 'properties-registered' signal can be emitted
// while this._ibusSources == null on a lock screen.
- if (!IBus || !this._ready) {
+ if (!this._ready) {
if (callback)
callback();
return;
},
preloadEngines: function(ids) {
- if (!IBus || !this._ibus || ids.length == 0)
+ if (!this._ibus || ids.length == 0)
return;
if (this._preloadEnginesId != 0) {
polkit_req = '>= 0.100'
schemas_req = '>= 3.21.3'
startup_req = '>= 0.11'
+ibus_req = '>= 1.5.2'
bt_req = '>= 3.9.0'
gst_req = '>= 0.11.92'
polkit_dep = dependency('polkit-agent-1', version: polkit_req)
soup_dep = dependency('libsoup-2.4')
startup_dep = dependency('libstartup-notification-1.0', version: startup_req)
+ibus_dep = dependency('ibus-1.0', version: ibus_req)
x11_dep = dependency('x11')
schemas_dep = dependency('gsettings-desktop-schemas', version: schemas_req)